package com.jshan.blog.service;

import com.jshan.blog.adapter.StorageAdapter;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public class FileUploadService {

    private final StorageAdapter storageAdapter;

    public FileUploadService(StorageAdapter storageAdapter) {
        this.storageAdapter = storageAdapter;
    }

    public String uploadFile(MultipartFile file, String type, String storageType) {
        return storageAdapter.uploadFile(file, type, storageType);
    }
}
